<template>
  <Navbar :changeComponent />

  <component :is="components[currentComponent]"></component>
</template>

<script setup>
import { ref } from "vue";
import AppList from "./components/AppList.vue";
import Navbar from "./components/Navbar.vue";
import Calendar from "./components/Calendar.vue";

const currentComponent = ref("List");

const components = {
  List: AppList,
  Calendar,
};

function changeComponent(component) {
  currentComponent.value = component;
}
</script>
